#include <iostream>

using namespace std;

class Task
{
public:
    Task(int a, int b, char op)
        : _x(a), _y(b), _op(op)
    {
    }

    void run()
    {
        switch (_op)
        {
        case '+':
            _res = _x + _y;
            break;
        case '-':
            _res = _x - _y;
            break;
        case '*':
            _res = _x * _y;
            break;
        case '/':
            if (_y != 0)
                _res = _x / _y;
            else
                _exitcode = 1;
            break;
        default:
            break;
        }

    }

    int result()
    {
        return _res;
    }



public:
    int _x;
    int _y;
    char _op;

    int _res;
    int _exitcode = 0;
};
